package bookManager.operation;

import bookManager.Book;
import bookManager.BookDao;

import java.util.List;

public class DisplayOperation implements IOperation{
    @Override
    public void work() {
        //把数据库中所有的书都查出来，再循环打印
        BookDao bookDao=new BookDao();
        List<Book> books=bookDao.findBooks();
        for (Book book:books) {
            System.out.println(book);
        }
        System.out.println("显示书籍完毕！！");
    }
}
